<%@ page contentType="text/html; charset=utf-8" %>
<%@ page import="java.net.URLEncoder"%>
<%@ page import="com.aspire.boc.mms.util.ResourceManager"%>
<%
      String userid = (String) session
                .getAttribute("edu.yale.its.tp.cas.client.filter.user");
      String flag=request.getParameter("flag");
        ResourceManager rm = ResourceManager.getInstance();
        String loginurl =rm.getValue("system.login.url");
        String backurl = rm.getValue("system.back.url");
        String logouturl = rm.getValue("system.logout.url");
        String url = loginurl + "?service="+ URLEncoder.encode(backurl, "UTF-8");
        //System.out.println("loginurl---"+url);
        if ( null != session){
            try {
                session.invalidate();
            } catch(Exception e) {
                e.printStackTrace();
            }
        }

        //String message="3秒后自动跳转到登录页面，或者点击下面的链接直接跳转。";
    
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/base.css" rel="stylesheet" type="text/css" />
<link href="css/defaultStyle.css" rel="stylesheet" type="text/css" />
<title>跳转到登录页面</title>
</head>
<body>
<table   cellpadding="0" cellspacing="0" align="center">
  <tr>
    <td id="dispTime" height="21" align="center" ></td>
  </tr>
  <tr>
    <td height="20" align="center" >&nbsp;</td>
  </tr>
  <tr>
    <td height="20" align="center" ><a href="<%=url%>">跳转到登录页面</a></td>
  </tr>
</table>
<iframe id="logout" name="logout" width="0" height="0" src="<%=logouturl%>"></iframe>
<script language="javascript" type="text/javascript">
var ua = navigator.userAgent.toLowerCase();
var isIE = /(msie\s|trident.*rv:)([\w.]+)/.exec(ua)!=null;
var loc = window.location;
var backUrl = '<%=url%>';
if(isIE) {
    window.onbeforeunload = function(){
        window.open(backUrl,'','left=0,top=0,width='+ (screen.availWidth - 10) +',height='+ (screen.availHeight-50)+',scrollbars,resizable=yes,toolbar=yes' );
        try {
            window.opener = null;
            window.open("", "_self");
            window.close();
        } catch (ex) {}
    }   
    loc.reload();
} else {
    loc.href = backUrl;
}
</script>
</body>
</html>
